Skip to content

Conversation

mkosiedowski
Copy link

Hi! I've found this issue while testing my project with PHP 8.
Required parameters after optional parameters in function/method signatures are deprecated in PHP 8

This is not a perfect solution, because the code will still throw an exception if the $function is passed as null, but I did not want to break backwards compatibility in the interface

@mahagr
Copy link

mahagr commented Dec 2, 2020

Looks like I missed your fix. See #34 which does it by opposite way.

My take on this is that having default value before required parameter has no effect and the default value gets ignored. Interface break can be handled by inceasing version number of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants